Image processing device, method and recording medium for compressing image data

ABSTRACT

An image processing device for compressing image data using conversion to spatial frequency components may include a dividing section that divides the image data into a plurality of pixel blocks and computes spatial frequency components of each pixel block; a segmenting section that computes an intensity of predetermined high frequency components from information of the spatial frequency components and segments the image data into a first plane formed by including a pixel block having an intensity which is less than a predetermined threshold value and into a second plane formed by including a pixel block having an intensity which is equal to or greater than the threshold value; a compression section that executes compression for the first plane image data by applying quantization and entropy coding using the spatial frequency components information; and a run length compression section that executes run length compression of the second plane image data.

This is a Division of application Ser. No. 10/376,608 filed Mar. 3,2003. The disclosure of the prior application is hereby incorporated byreference herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing device forcompressing image data.

2. Description of the Related Art

In devices for handling image data, it is common practice to compressimage data in order to reduce data transfer load and lower data storagerequirements. In order to compress image data efficiently, it isimportant to select the compression method and compression parameters tomatch the characteristics of the image data. For example, in the case ofan image having comparatively low frequency spatial frequencycomponents, such as a natural image, a JPEG (Joint Picture ExpertsGroup) compression method is applied, while run length compression isapplied to sections having consecutive characters or the like.

Most images are not made up of sections having only one characteristic,such just natural images or just text, and are in fact normally acombination of natural images and text. For this reason, if the samecompression is carried out for all of the data, compression efficiencyis lowered and quality is degraded. For example, if image datacontaining natural images and text is compressed using JPEG, it ispossible to carry out appropriate compression for the natural imagesection, but the quality of the text section is degraded and compressionefficiency is lowered.

There are therefore techniques to segment image data into natural imagesection planes and text section planes and apply appropriate compressionfor each plane. In this case, segmentation into planes discriminatestext regions using edge detection or presence or absence of restrictedcolour. Examples of such techniques are disclosed. in Japanese PatentLaid-open No. Hei. 7-236062. A technique for segmenting into planesbased on results of encoding is also disclosed in Japanese PatentLaid-open No. Hei. 11-168633.

SUMMARY OF THE INVENTION

However, with the above described image processing techniques, overallprocessing load is increased because processing that is unrelated to thecompression is used when segmenting into planes, and encoding processingis reiterated. Also, segmentation processing does not always bring aboutan appropriate result, which means that the increase in load is notsufficiently compensated for by the extent of improvement incompression.

The present invention has been conceived in view of the above describedsituation, and an advantage of the present invention is that it providesan image processing device that can sufficiently improve compressionwith a low processing load.

In order to achieve the above described advantage, the present inventionprovides an image processing device, for performing compression of imagedata using multistage processing, comprising segmenting means forsegmenting image data into a plurality of planes using results ofpre-processing, and means for carrying out respective post-processingusing results of pre-processing for the image data segmented intoplanes.

Here, the means for carrying out post-processing can selectively applydifferent processing for each plane. Also, the means for carrying outpost-processing may apply processing using different processingparameters for each plane.

According to the present invention, there is also provided an imageprocessing device for performing compression of image data usingprediction encoding, comprising means for sequentially selecting notedpixels from image data that was subject of compression, and determiningwhether or not the noted pixel can be predicted from information forother pixels, segmenting means for segmenting the image data into afirst plane including a set of pixels determined to be predictable, anda second plane including a set of pixels determined not to bepredictable, and means for applying compression using predictionencoding for image data of the first plane.

According to the present invention there is also provided an imageprocessing device for carrying out compression of image data usingconversion to spatial frequency components, comprising means forconverting image data to spatial frequency components, segmenting meansfor segmenting image data into a plurality of planes based on results ofthe conversion to spatial frequency components, and means for applyingcompression to at least one of the plurality of planes using the resultsof the conversion to spatial frequency components.

According to another aspect of the present invention, there is alsoprovided an image processing device for compressing image data usingrepeatability of data patterns, comprising means for executing patternmatching for image data, segmenting means for segmenting image data intoa plurality of planes based on results of the pattern matching, andmeans for applying compression to at least one of the plurality ofplanes using pattern repeatability.

In order to solve the above described problems, the present inventionalso provides an image data generating method, for generating image datacompressed using multistage processing, comprising a step of segmentingimage data into a plurality of planes using results of pre-processing,and a step of carrying out respective post-processing for the image datasegmented into planes using results of the pre-processing.

In order to solve the above described problems of the related art, thepresent invention also provides a program for carrying out compressionof image data through multistage processing using a computer, forcausing execution on the computer of a procedure for segmenting imagedata into a plurality of planes using results of pre-processing, and aprocedure for carrying out respective post-processing for the image datasegmented into planes using results of the pre-processing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural block diagram of an image processing device of anembodiment of the present invention.

FIG. 2 is a functional block diagram showing an overview of an imagecompression program executed by a CPU 1.

FIG. 3 is a functional block diagram showing one example of an imagecompression program executed by a CPU 1.

FIG. 4 is a flowchart showing one example of specific processing contentfor a decision section.

FIG. 5 is an explanatory drawing showing an overview of image data ofeach plane and mask image data appearing during processing of the imageprocessing device of the present invention.

FIG. 6 is a functional block diagram showing another example of an imagecompression program executed by a CPU 1.

FIG. 7 is a functional block diagram showing yet another example of animage compression program executed by a CPU 1.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

An embodiment of the present invention will now be described withreference to the drawings. An image processor of the embodiment of thepresent invention is a general computer, and as shown in FIG. 1,comprises a CPU 1, a memory section 2, a hard disk 3 and an input/outputinterface 4. The CPU 1 executes programs stored on the hard disk 3, andimplements the various means of the present invention. Specificprocessing contents for this CPU 1 —will be described in detail later.The memory section 2 acts as working memory for the CPU 1. The hard disk3 stores programs executed by the CPU 1. The input/output interface 4outputs image data and user instructions input from the outside to theCPU 1. Also, image data that has been subjected to compression is outputto the outside in accordance with instructions input from the CPU 1.

Next, an image processing program stored on the hard disk 3 and executedby the CPU will be described. As shown in FIG. 2, for example, thisimage processing program is basically made up of an image segmentingsection 11 and a compression section 12, and the compression section 12includes a pre-processing section 13 and a post-processing section 14.The pre-processing section 13 executes processing for the previous stageof compression for input image data, and the results are output to theimage segmenting section 11. The image segmenting section 11 segmentsthe input image data into a plurality of planes, generates image datafor each plane and outputs the data to the post-processing section 14 ofthe compression section 12. The post-processing section 14 executesspecified processing on image data of the input plurality of planes togenerate compressed image data. It is not necessary to performcompression for image data of all the planes, and it is possible toperform compression for image data of at least one plane.

In this embodiment, it is possible to use various compression methodsfor this compression. In the following, the case of using predictionencoding will be described as a specific example.

[Compression Program Using Prediction Encoding]

A compression program using prediction encoding is shown as a functionalblock diagram in FIG. 3, and includes a compression expansioninterpolation section 21, a pixel value prediction section 22, adecision section 23, an image segmenting section 24, a reductionprocessing section 25, a JPEG encoding section 26, a prediction encodingsection 27, and a code output section 28. Here, processing carried outby the compression expansion interpolation section 21 and the pixelvalue prediction section 22 is equivalent to the pre-processing of thepresent invention, while processing carried out by the reductionprocessing section 25 and JPEG encoding section 26, and the predictionencoding section 27 is equivalent to the post-processing of the presentinvention.

The compression expansion interpolation section 21 receives input ofimage data that is the subject of processing, carries out compression orexpansion processing on the image data to convert the resolution,obtains a value for each pixel of the image data after resolutionconversion using a 4-point linear interpolation method (bi-linearinterpolation method) and outputs the values as interpolated image data.The pixel value prediction section 22 receives input of image data thatis the subject of processing, sequentially selects each pixel of theimage data as noted pixels, and determines whether prediction possiblefor each of the selected noted pixels. Information as to whetherprediction is predictable for each pixel constituting the image data isthen output as prediction evaluation information. Here, as predictionevaluations there are determination results as to whether or not it ispossible to predict values for the noted pixels from values of pixelsaround the noted pixels. In more detail, it is respectively determinedwhether or not it is possible to predict a noted pixel (is predictable)from already selected pixels (as previous noted pixels) among pixelsaround the noted pixel, and whether or not it is possible to predict thenoted pixel from pixels selected after that (selected as a noted pixellater on) (is Backward Predictable), and then prediction evaluationinformation is obtained for these “is predictable” and “is backwardpredictable” conditions.

The decision section 23 receives input of each pixel value of image dataafter resolution conversion, and prediction evaluation information foreach pixel, from the compression expansion interpolation section 21 andthe pixel value prediction section 22 respectively, and generatesinformation for determining planes to which each pixel will belong(plane designation information) using specified conditions based onthese input values. Specific examples of the specified conditions usedhere will be given later. Also, plane designation information output bythe decision section 23 represents whether the pixel belongs to a firstplane to be subjected to JPEG encoding later, or a second plane to besubjected to prediction encoding, and is, for example, mask image datawith the same size as the image data and a depth (number of bits persingle pixel) of “1”, or mask image data such that pixels equivalent topixels to belong to the first plane become “1” while pixels equivalentto pixels to belong to the second plane become “0”.

The image segmenting section 24 selectively outputs each pixelconstituting image data to either the reduction processing section 25 orthe prediction encoding section 27 based on plane designationinformation output by the decision section 23. Specifically, this imagesegmenting section 24 respectively generates, in the following order,image data to be processed by the prediction encoding section 27 (firstplane image data) and image data to be processed by the reductionprocessing section 25 (second plane image data)

That is, the image segmenting section 24 ensures that there are tworegions for storing image data of the same size as the input image data.One of these two regions is the first plane image data and the other isthe second plane image data. The image segmenting section 24 thereforesequentially selects each pixel of the input image data and acquires thevalue of the selected pixel as a set value. Values of pixels in the maskimage data, corresponding to the pixels, are then referenced. When thevalue is “0”, a value of a corresponding pixel in the first plane imagedata is made the set value. Also, if a corresponding pixel in the maskimage data is “1”, the value of a corresponding pixel in the secondplane image data is set to the set value. Accordingly, of the pixelsincluded in the first plane image data, parts equivalent to a regionwhere pixel values in mask image data become “1” are kept at a valueinitially set when ensuring the region. These parts are called “don'tcare” in the following. Of pixels included in the second plane imagedata, those located in parts equivalent to a region where pixel valuesin mask image data become “0” are similar called “don't care”.

In this way, the first plane image data formed by including the imageportion equivalent to a region where values of pixels in the mask imagedata are “0”, and the second plane image data formed by including theimage portion equivalent to a region where values of pixels in the maskimage data are “1”, are generated, and these data are respectively usedby the reduction processing section 25 and the prediction encodingsection 27.

The reduction processing section 25 performs compression of the secondplane image data and carries out resolution conversion. Reductionprocessing carried out here is the same as reduction processing carriedout in the compression expansion interpolation section 21. The JPEGencoding section 26 carries out JPEG encoding processing for the imagedata that has been subjected to reduction processing, performscompression on the image data and outputs the resultant data.

The prediction encoding section 27 performs compression of the firstplane image data using prediction encoding, and outputs results of thecompression. The code output section 28 generates compression image datamade up including results of compression input from the JPEG encodingsection 26 and results of compression input from the prediction encodingsection 27, writes the data to the hard disk 3 or outputs the data tothe outside via the input output interface 4. Processing for each ofthese sections is actually executed by the CPU 1.

An example of specific conditions when determining the plane to whicheach pixel belongs in the decision section 23 will now be described. Thedecision section 23 is realized by the processing as shown in FIG. 4,and the planes are determined by this processing. If the CPU 1 commencesthis processing for the decision section 23, first of all information(immediately previous information) representing what plane the pixelprocessed immediately previous belongs to is initialized, and set to apredetermined value (for example, “first plane”) (S1). Also, mask imagedata having the same size as the input image data and a depth of 1 isgenerated and stored in the memory section 2. Next, pixels aresequentially selected from the input image data (S2). The order forselection of pixels here is the same as the order for selecting notedpixels in the processing for the pixel value prediction section 22.

Next the CPU 1 compares the values of the selected pixels with values ofcorresponding pixels in the interpolated image data, and Boolean valuesrepresenting whether or not a difference between the two is less than apredetermined threshold value are generated as gap information (isGap)(S3). It is then determined whether or not information (immediatelyprevious information) stored as the plane to which the pixel processedimmediately before belongs is the “first plane” or the “second plane”(S4), and if it is the “first plane” a Boolean value for isPredictable ∥(isGap && isBackwardPredictable) is calculated using the gap information(isGap) generated in process S3, and isPredictable andisBackwardPredictable for the selected pixels, as the above describedspecified conditions, and it is checked whether this Boolean value istrue or false (S5). Here, the symbol “∥” means “OR” and the symbol “&&”means “AND”, and the content inside brackets is calculated first.Notation with these symbols is widely used in notation such as the Clanguage.

If the Boolean value calculated in processing of S5 is true, the CPU 1determines that the plane to which the selected pixel belongs is “firstplane”, sets the corresponding pixel of the mask image data to “1” andsets the immediately previous information to “first plane” (S6) If theBoolean value calculated in the processing of S5 is false, it isdetermined that the plane to which the selected pixel belongs is the“second plane”, the corresponding pixel of the mask image data is set to“0” and sets the immediately previous information to “second plane”(S7). After the plane to which the selected pixel belongs has beendecided in process S6 or process S7, it is checked whether or not thereare unselected pixels (S8), and if there are unselected pixels (Yes),processing returns to S2 so as to select the pixels (B). On the otherhand, if there are no unselected pixels (N0), the mask image data storedin the memory section 2 is output as plane designation information andprocessing terminates.

In process S4, if the immediately previous information is “secondplane”, the CPU 1 calculates a Boolean value for isGap && (isPredictable∥ isBackwardPredictable) using the gap information (isGap) generated inprocess S3, and isPredictable and isBackwardPredictable for the selectedpixels, as the above described specified conditions, and it is checkedwhether this Boolean value is true or false (S9). If this value is true,processing moves to the process S6. If the value is false in S9,processing moves to S7 (A).

If the pixel processed immediately previously belongs to the secondplane, the processing for the decision section 23 of this embodimentdetermines that the pixel belongs to the first plane if there ispredictability, even if the gap information is true (this is equivalentto the case where the pixel in the image data is equivalent to an edgeportion), and determines that the pixel belongs to the second plane ifthere is no predictability, even if the gap information is true. Also,if the pixel processed immediately previously belongs to the firstplane, if there is predictability it is determined that the pixelbelongs to the first plane based on the already processed pixels (amongthose, they can be made to belong to the first plane), and if, with thegap information true, and based on pixels processed afterwards, there ispredictability, it is determined that the pixel belongs in the firstplane. The latter is done because it is determined that the pixel islocated at the end (upper left end) of a pixel set belonging to thefirst plane. Logical operations carried out in processes S5 and S9 shownhere, and Boolean values appearing in these processes, are only workingexamples, and it is also possible to use other values an operations.

A characteristic of the processing of the decision section 23 of thisembodiment is that decision results for the immediately previous pixelare used. This means that the bad practice of there being multipleisolated points in the mask image data thus reducing compressionefficiency of the mask image data is prevented.

[Further Example of Conditions for Determination in the Decision Section23]

Here, the plane to which each pixel belongs is determined using not onlygap information calculated based on interpolated image data input fromthe compression expansion interpolation section 21 and input image data,but also using information about whether prediction is possible.However, it is also possible to carry out simplified processing whereonly the gap information is used and it is determined that the pixelbelongs in the first plane if the gap information is greater than orequal to a predetermined threshold value, and it is determined that thepixel belongs in the second plane if the gap information less than thethreshold value. This is decision processing using prediction encodingfor cases where degradation due to compression expansion interpolationis large. Similarly, it is possible to determine the plane to which eachpixel belongs using only predictability.

[Operation]

Next, operation of an image processing device of this embodiment will bedescribed. The CPU 1 executes compression expansion interpolationprocessing for the input image data and stores the interpolated imagedata in the memory section 2. The CPU also checks whether or not eachpixel can be forwardly or backward predicted with respect to input imagedata, and for each pixel, associated information related to forwardpredictability and backward predictability is stored in the memorysection 2.

The CPU 1 executes the processing shown in FIG. 4 to generate planedesignation information indicating which of the first plane or thesecond plane each pixel belongs to and stores this information in thememory section 2. This plane designation information is implemented as,for example, mask image data. The CPU 1 applies mask image data to theinput image data, segments into first plane image data, made up of aninput image data pixel set corresponding to pixels in the mask imagedata that are “1”, and second plane image data, made up of an inputimage data pixel set corresponding to pixels in the mask image data thatare “0”, and stores the respective image data in the memory section 2.

Specifically, as shown in FIG. 5, first plane image data P1 to besubjected to prediction encoding, second plane image data P2 to besubjected to JPEG encoding and mask image data M representing whichplane each pixel belongs to are generated from input image data INincluding a natural image portion N and a text image portion T.Normally, the mask image data M shown in FIG. 5 is black (0) only for aregion enclosed by the outline of the natural image, but as a result ofthe above described processing, by determining which plane a pixelbelongs to a black (0) region continues further to the upper right sideof the drawing (pixel scanning direction) from the outline correspondingto use of the state of the immediately previous pixel.

The CPU 1 then executes prediction encoding processing for the firstplane image data and stores the results in the memory section 2. On theother hand, reduction processing is carried out for the second planeimage data, followed by JPEG encoding, and the results are stored in thememory section 2. In this way the CPU combines and outputs theprediction encoded image data, the image data after JPEG encoding andthe mask image data. It is also possible to carry out compression suchas run length compression for the mask image data.

Here, the compression expansion interpolation processing and processingto check whether or not prediction is possible are respectivelycompression processing, that is post-processing, and processing toacquire information used when carrying out prediction encodingprocessing. With this embodiment, since results of originally requiredprocessing are used in processing to segment the image data into planes,increase in overall load of image compression processing is only slight,and it is possible to achieve segmentation into planes and tosufficiently improve compression. It is also possible to use results ofcompression expansion interpolation processing in the processing of thereduction processing section 25, and to use processing results of thepixel value prediction section 22 in the processing of the predictionencoding section 27.

For image data that has been subjected to compression in this way,decoding processing is carried out corresponding to the predictionencoding for the section where first plane image data has beencompressed, and decoding processing corresponding to JPEG encoding andexpansion processing corresponding to the compression is carried out forthe section where second plane image data has been compressed. Decodedimage data for each plane is combined using mask image data (usingdecoding when this has been encoded), and the original image data isreproduced.

[Processing Before Prediction Encoding]

As processing for the prediction enclosing section 27 carried out by theCPU 1, it is possible to carry out the following processing beforeprediction encoding. Specifically, in order to carry out predictionencoding of the first plane image data, if a difference in value betweena previously selected pixel and the currently selected pixel, when eachpixel of the image data is being selected, is smaller than a specifiedthreshold value, the CPU 1 makes the value of the currently selectedpixel to the same value as the previously selected pixel. In this case,it is possible to carry out processing such as MTF (Move-to-Front)estimation (estimation for compressing depending on how long before apixel of the same value was processed) or error diffusion in order toprevent image quality degradation, to simplify processing thisprocessing is not absolutely necessary.

[Compression Program Using Conversion to Spatial Frequency Components]

So far the case of using prediction encoding has been given as anexample of a compression method, but as well as this it is also possibleto carry out similar processing in the case where conversion to spatialfrequency components is used or where repeatability of data patterns isused, so these type of situations will be described in the following.

First of all, the case of using conversion to spatial frequencycomponents will be described. As shown in FIG. 6, a program to beexecuted by the CPU 1 in this case includes a DCT processing section 31,a decision section 32, an image segmenting section 33, a JPEG encodingsection 34, an LZ (Lampel-Ziv) encoding section 35 and a code outputsection 36.

The DCT (discrete cosine transform) processing section 31 divides inputimage data up into, for example, pixel blocks of 8×8, and calculates aspatial frequency component for each pixel block. The decision section32 calculates strength of a specified high frequency component frominformation of the spatial frequency components input from the DCTprocessing section 31, plane designation information is generated suchthat if this strength is smaller than a predetermined threshold valuethe pixels belonging to that pixel block are set as belonging to thefirst plane, while otherwise pixels belonging to that pixel block areset as belonging to the second plane, and this information is output tothe image segmenting section 33.

The image segmenting section 33 receives input of plane designationinformation from the decision section 32, and selectively outputs eachpixel of the input image data to either the JPEG encoding section 34 orthe LZ encoding section 35 based on this plane designation information.Specifically, image data (first plane image data) made up from a subsetof pixels belonging to the first plane are output to the JPEG encodingsection 34, and image data (second plane image data) made up from asubset of pixels belonging to the second plane are output to the LZencoding section 35.

The JPEG encoding section 34 executes JPEG compression for the firstplane image data and outputs the results to the code output section 36.The LZ encoding section 35 executes LZ compression for the second planeimage data and outputs the results to the code output section 36. Here,LZ compression is carried out using repeatability of data patternsincluded in the image data, and the actual content is widely known andso will not be described in detail. The code output section 36 generatesdata including JPEG compressed image data and LZ compressed image data,and outputs this as image data of the compression result.

The JPEG encoding section 34 also uses information of the spatialfrequency components generated in the DCT processing section 31 toperform quantization and entropy coding processing. Specifically,calculation results from the DCT processing section are used in both thesegmentation processing by the decision section 32 and the imagesegmenting section 33, and the JPEG compression by the JPEG encodingsection 34. Here, processing by the DCT processing section 31 isequivalent to pre-processing, and processing by the JPEG encodingsection 34 is equivalent to post-processing.

[Compression Program Using Repeatability of data Patterns]

A case of using repeatability of data patterns will also be described. Aprogram to be executed by the CPU 1 in this case comprises a patternmatching section 41, a decision section 42, an image segmenting section43, a JPEG encoding section 44, an LZ encoding section 45 and a codeoutput section 46, as shown in FIG. 7.

The pattern matching section 41 divides the input image data up into,for example, 8×8 pixel blocks, checks pixels in each pixel block whileselectively selecting pixels, and checks whether or not there is astring of pixels appearing repeatedly as a pattern in the pixel block.Here, if there is a string of pixels appearing repeatedly as a patterninformation specifying the pattern and information specifying theposition where the pattern appears are output.

The decision section 42 generates plane designation information suchthat if a string of pixel values appearing repeatedly as a pattern isfound by the pattern matching section 41, (if the pattern matchingsection 41 outputs information specifying a pattern etc.) the pixels inthe pixel block are set as pixels belonging to the first plane, andotherwise sets the pixels in the pixel block as belonging to the secondplane, and outputs the plane designation information to the imagesegmenting section 43.

The image segmenting section 43 receives input of the plane designationpattern from the decision section 42, and selectively outputs each pixelof the input image data to either the LZ encoding section 45 or the JPEGencoding section 44 based on this plane designation information.Specifically, image data made up from a subset of pixels belonging tothe first plane (first plane image data) are output to the LZ encodingsection 45, and image data made up from a subset of pixels belonging tothe second plane (second plane image data) are output to the JPEGencoding section 44.

The JPEG encoding section 44 executes JPEG compression for the secondplane image data and outputs the results to the code output section 46.The LZ encoding section 45 executes LZ compression for the first planeimage data and outputs the results to the code output section 46. Thecode output section 46 generates data made up to contain image data thathas been subjected to JPEG compression and image data that has beensubjected to LZ compression and outputs as compression result imagedata.

Here, the LZ encoding section 45 carries out encoding using informationspecifying a pattern and information specifying the position where thepattern appears, output by the pattern matching section 41.Specifically, here processing by the pattern matching section isequivalent to pre-processing and processing by the LZ encoding sectionis equivalent to post-processing.

[Pixel Filling]

As has already been described, void (don't care) pixels are included inthe first plane image data and the second plane image data generated bythe image segmenting sections 24, 33 and 43. These void pixels caneither be left as they are or set to a predetermined value, but in anycase, it is possible to set to a suitable value by carrying out thefollowing processing.

Specifically, the image segmenting sections 24, 33 and 43 set values ofvoid pixels of the image data in each plane depending on the compressionmethod for image data of each plane. For example, in the case of usingprediction encoding, void pixels in the image data of the planesubjected to prediction encoding are set to the same value as pixelsprocessed immediately previously. In this way, it is possible to improveencoding efficiency using prediction encoding. Also, in the case ofusing JPEG encoding, values of void pixels are set to an average valueof values of pixels surrounding the pixels. In this way it is possibleto improve the efficiency of JPEG encoding.

According to the present invention, compression pre-processing isexecuted for image data, the image data are segmented into a pluralityof planes based on results of the pre-processing, and, among the imagedata of each segmented plane, at least one is subjected to compression(post processing) following on from the pre-processing executed before,and compressed image data is generated and output. Accordingly,segmentation of image data is made possible without additionalprocessing, increase in processing load is restricted and it is possibleto improve compression efficiency.

1. An image processing device which compresses image data usingprediction encoding, comprising: a prediction unit that sequentiallyselects a noted pixel from image data subjected to compression, anddetermines whether or not the noted pixel can be predicted frominformation for other pixels; a segmenting unit that segments the imagedata into a first plane including a set of pixels determined as beingpredictable, and a second plane including a set of pixels determined asbeing not predictable; and a compression processor that carries outcompression using prediction encoding to image data of the first plane.2. An image processing device comprising: a pixel value prediction unitthat sequentially selects a noted pixel from image data subjected tocompression, and determines whether or not the noted pixel can bepredicted from other pixels; an enlargement/reduction interpolation unitthat converts resolution by applying enlargement or reduction withrespect to the image data subjected to compression, and interpolates avalue of each pixel of image data after the resolution has beenconverted; an image segmenting unit that segments the image datasubjected to compression into image data of a first plane and image dataof a second plane based on the determined information of whether or notthe noted pixel is predictable and the interpolated value of each pixel;and a compression processor that carries out compression usingprediction encoding to at least image data of the first plane.
 3. Animage processing device comprising: a pixel value prediction unit thatsequentially selects a noted pixel from image data subjected tocompression, and executes a forward prediction to determine whether ornot the noted pixel can be predicted from pixels which have already beenselected as noted pixels and a backward prediction to determine whetheror not the noted pixel can be predicted from pixels that have not yetbeen selected as noted pixels; an enlargement/reduction interpolationunit that converts resolution by applying enlargement or reduction withrespect to the image data subjected to compression, interpolates, basedon an image size of the image data subjected to compression, a value ofeach pixel of image data after the resolution has been converted, andoutputs the result as interpolated image data; an image segmenting unitthat sequentially selects a noted pixel from the image data subjected tocompression, determines whether or not the noted pixel is an edgeportion by comparing a pixel value of the noted pixel and a pixel valueof a pixel of the interpolated image data corresponding to the notedpixel, determines whether each pixel of the image data subjected tocompression belongs to a first plane or a second plane based on at leastone of the edge determination result, a determination result of theforward prediction, and a determination result of the backwardprediction, and segments, based on the determination result, the imagedata subjected to compression into image data of the first plane andimage data of the second plane; and a compression processor that carriesout compression using prediction encoding to at least image data of thefirst plane.
 4. The image processing device according to claim 3,wherein the image segmenting unit: determines that the present notedpixel belongs to the first plane when a previous noted pixel belongs tothe second plane, the present noted pixel is the edge portion, and thedetermination result of the forward prediction or the backwardprediction with respect to the present noted pixel is predictable;determines that the present noted pixel belongs to the second planeregardless of whether or not the present noted pixel is the edge portionwhen the previous noted pixel belongs to the second plane and thedetermination result of the forward prediction and the backwardprediction with respect to the present noted pixel is not predictable;determines that the present noted pixel belongs to the first planeregardless of whether or not the present noted pixel is the edge portionwhen the previous noted pixel belongs to the first plane and thedetermination result of the forward prediction with respect to thepresent noted pixel is predictable; and determines that the presentnoted pixel belongs to the first plane when the previous noted pixelbelongs to the first plane, the present noted pixel is the edge portion,and the determination result of the backward prediction with respect tothe present noted pixel is predictable.
 5. The image processing deviceaccording to claim 4, wherein the image segmenting unit determines thata noted pixel is the edge portion when a difference between a pixelvalue of the noted pixel and a pixel value of a pixel of theinterpolated image data corresponding to the noted pixel is greater thanor equal to a predetermined threshold value.
 6. The image processingdevice according to claim 3, wherein the compression processor appliescompression using JPEG encoding to the image data of the second plane.7. The image processing device according to claim 3, wherein thecompression processor applies compression using JPEG encoding to theimage data of the second plane after applying a reduction process to theimage data of the second plane.
 8. A computer readable recording mediumstoring a program causing a computer to execute a process forcompressing image data using prediction encoding, the processcomprising: sequentially selecting a noted pixel from image datasubjected to compression, and determining whether or not the noted pixelcan be predicted from information for other pixels; segmenting the imagedata into a first plane including a set of pixels determined as beingpredictable, and a second plane including a set of pixels determined asbeing not predictable; and carrying out compression using predictionencoding to image data of the first plane.
 9. A method for compressingimage data using prediction encoding, the method comprising:sequentially selecting a noted pixel from image data subjected tocompression, and determining whether or not the noted pixel can bepredicted from information of other pixels; segmenting the image datainto a first plane including a set of pixels determined as beingpredictable, and a second plane including a set of pixels determined asbeing not predictable; and carrying out compression using predictionencoding to image data of the first plane.
 10. A computer readablerecording medium storing a program causing a computer to execute aprocess for compressing image data using prediction encoding, theprocess comprising: sequentially selecting a noted pixel from image datasubjected to compression, and determining whether or not the noted pixelcan be predicted from other pixels; converting resolution by applyingenlargement or reduction with respect to the image data subjected tocompression and interpolating a value of each pixel of image data afterthe resolution has been converted; segmenting the image data subjectedto compression into image data of a first plane and image data of asecond plane based on the determined information of whether or not thenoted pixel is predictable and the interpolated value of each pixel; andcarrying out compression using prediction encoding to at least imagedata of the first plane.
 11. A method for compressing image data usingprediction encoding, the method comprising: sequentially selecting anoted pixel from image data subjected to compression, and determiningwhether or not the noted pixel can be predicted from other pixels;converting resolution by applying enlargement or reduction with respectto the image data subjected to compression and interpolating a value ofeach pixel of image data after the resolution has been converted;segmenting the image data subjected to compression into image data of afirst plane and image data of a second plane based on the determinedinformation of whether or not the noted pixel is predictable and theinterpolated value of each pixel; and carrying out compression usingprediction encoding to at least image data of the first plane.
 12. Acomputer readable recording medium storing a program causing a computerto execute a process for compressing image data using predictionencoding, the process comprising: sequentially selecting a noted pixelfrom image data subjected to compression, and executing a forwardprediction to determine whether or not the noted pixel can be predictedfrom pixels which have already been selected as noted pixels and abackward prediction to determine whether or not the noted pixel can bepredicted from pixels which have not yet been selected as noted pixels;converting resolution by applying enlargement or reduction with respectto the image data subjected to compression, interpolating, based on animage size of the image data subjected to compression, a value of eachpixel of the image data after the resolution has been converted, andoutputting the result as interpolated image data; determining whether ornot a noted pixel is an edge portion by sequentially selecting the notedpixel from the image data subjected to compression and comparing a pixelvalue of the noted pixel and a pixel value of a pixel of theinterpolated image data corresponding to the noted pixel, determiningwhether each pixel of the image data subjected to compression belongs toa first plane or a second plane based on at least one of the edgedetermination result, a determination result of the forward prediction,and a determination result of the backward prediction, and segmentingthe image data subjected to compression into image data of the firstplane and image data of the second plane based on the determinationresult; and carrying out compression using prediction encoding to atleast the image data of the first plane.
 13. A method for compressingimage data using prediction encoding, the method comprising:sequentially selecting a noted pixel from image data subjected tocompression, and executing a forward prediction to determine whether ornot the noted pixel can be predicted from pixels which have already beenselected as noted pixels and a backward prediction to determine whetheror not the noted pixel can be predicted from pixels which have not yetbeen selected as noted pixels; converting resolution by applyingenlargement or reduction with respect to the image data subjected tocompression, interpolating, based on an image size of the image datasubjected to compression, a value of each pixel of the image data afterthe resolution has been converted, and outputting the result asinterpolated image data; determining whether or not a noted pixel is anedge portion by sequentially selecting the noted pixel from the imagedata subjected to compression and comparing a pixel value of the notedpixel and a pixel value of a pixel of the interpolated image datacorresponding to the noted pixel, determining whether each pixel of theimage data subjected to compression belongs to a first plane or a secondplane based on at least one of the edge determination result, adetermination result of the forward prediction, and a determinationresult of the backward prediction, and segmenting the image datasubjected to compression into image data of the first plane and imagedata of the second plane based on the determination result; and carryingout compression using prediction encoding to at least the image data ofthe first plane.